


<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
  <title>Python Language Reference Coverage &mdash; PyTorch master documentation</title>
  

  
  
  
  
    <link rel="canonical" href="https://pytorch.org/docs/stable/jit_python_reference.html"/>
  

  

  
  
    

  

  <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
  <!-- <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> -->
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.10.0-beta/dist/katex.min.css" type="text/css" />
  <link rel="stylesheet" href="_static/css/jit.css" type="text/css" />
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.css" type="text/css" />
  <link rel="stylesheet" href="_static/katex-math.css" type="text/css" />
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" /> 

  
  <script src="_static/js/modernizr.min.js"></script>

  <!-- Preload the theme fonts -->

<link rel="preload" href="_static/fonts/FreightSans/freight-sans-book.woff2" as="font" type="font/woff2" crossorigin="anonymous">
<link rel="preload" href="_static/fonts/FreightSans/freight-sans-medium.woff2" as="font" type="font/woff2" crossorigin="anonymous">
<link rel="preload" href="_static/fonts/IBMPlexMono/IBMPlexMono-Medium.woff2" as="font" type="font/woff2" crossorigin="anonymous">
<link rel="preload" href="_static/fonts/FreightSans/freight-sans-bold.woff2" as="font" type="font/woff2" crossorigin="anonymous">
<link rel="preload" href="_static/fonts/FreightSans/freight-sans-medium-italic.woff2" as="font" type="font/woff2" crossorigin="anonymous">
<link rel="preload" href="_static/fonts/IBMPlexMono/IBMPlexMono-SemiBold.woff2" as="font" type="font/woff2" crossorigin="anonymous">

<!-- Preload the katex fonts -->

<link rel="preload" href="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/fonts/KaTeX_Math-Italic.woff2" as="font" type="font/woff2" crossorigin="anonymous">
<link rel="preload" href="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/fonts/KaTeX_Main-Regular.woff2" as="font" type="font/woff2" crossorigin="anonymous">
<link rel="preload" href="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/fonts/KaTeX_Main-Bold.woff2" as="font" type="font/woff2" crossorigin="anonymous">
<link rel="preload" href="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/fonts/KaTeX_Size1-Regular.woff2" as="font" type="font/woff2" crossorigin="anonymous">
<link rel="preload" href="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/fonts/KaTeX_Size4-Regular.woff2" as="font" type="font/woff2" crossorigin="anonymous">
<link rel="preload" href="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/fonts/KaTeX_Size2-Regular.woff2" as="font" type="font/woff2" crossorigin="anonymous">
<link rel="preload" href="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/fonts/KaTeX_Size3-Regular.woff2" as="font" type="font/woff2" crossorigin="anonymous">
<link rel="preload" href="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/fonts/KaTeX_Caligraphic-Regular.woff2" as="font" type="font/woff2" crossorigin="anonymous">
</head>

<div class="container-fluid header-holder tutorials-header" id="header-holder">
  <div class="container">
    <div class="header-container">
      <a class="header-logo" href="https://pytorch.org/" aria-label="PyTorch"></a>

      <div class="main-menu">
        <ul>
          <li>
            <a href="https://pytorch.org/get-started">Get Started</a>
          </li>

          <li>
            <div class="ecosystem-dropdown">
              <a id="dropdownMenuButton" data-toggle="ecosystem-dropdown">
                Ecosystem
              </a>
              <div class="ecosystem-dropdown-menu">
                <a class="nav-dropdown-item" href="https://pytorch.org/hub"">
                  <span class=dropdown-title>Models (Beta)</span>
                  <p>Discover, publish, and reuse pre-trained models</p>
                </a>
                <a class="nav-dropdown-item" href="https://pytorch.org/ecosystem">
                  <span class=dropdown-title>Tools & Libraries</span>
                  <p>Explore the ecosystem of tools and libraries</p>
                </a>
              </div>
            </div>
          </li>

          <li>
            <a href="https://pytorch.org/mobile">Mobile</a>
          </li>

          <li>
            <a href="https://pytorch.org/blog/">Blog</a>
          </li>

          <li>
            <a href="https://pytorch.org/tutorials">Tutorials</a>
          </li>

          <li class="active">
            <a href="https://pytorch.org/docs/stable/index.html">Docs</a>
          </li>

          <li>
            <div class="resources-dropdown">
              <a id="resourcesDropdownButton" data-toggle="resources-dropdown">
                Resources
              </a>
              <div class="resources-dropdown-menu">
                <a class="nav-dropdown-item" href="https://pytorch.org/resources"">
                  <span class=dropdown-title>Developer Resources</span>
                  <p>Find resources and get questions answered</p>
                </a>
                <a class="nav-dropdown-item" href="https://pytorch.org/features">
                  <span class=dropdown-title>About</span>
                  <p>Learn about PyTorch’s features and capabilities</p>
                </a>
              </div>
            </div>
          </li>

          <li>
            <a href="https://github.com/pytorch/pytorch">Github</a>
          </li>
        </ul>
      </div>

      <a class="main-menu-open-button" href="#" data-behavior="open-mobile-menu"></a>
    </div>

  </div>
</div>


<body class="pytorch-body">

   

    

    <div class="table-of-contents-link-wrapper">
      <span>Table of Contents</span>
      <a href="#" class="toggle-table-of-contents" data-behavior="toggle-table-of-contents"></a>
    </div>

    <nav data-toggle="wy-nav-shift" class="pytorch-left-menu" id="pytorch-left-menu">
      <div class="pytorch-side-scroll">
        <div class="pytorch-menu pytorch-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          <div class="pytorch-left-menu-search">
            

            
              
              
                <div class="version">
                  master (1.5.0 )
                </div>
              
            

            


  


<div role="search">
  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
    <input type="text" name="q" placeholder="Search Docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

            
          </div>

          
<div>
  <a style="color:#F05732" href="https://pytorch.org/docs/stable/jit_python_reference.html">
    You are viewing unstable developer preview docs.
    Click here to view docs for latest stable release.
  </a>
</div>

            
            
              
            
            
              <p class="caption"><span class="caption-text">Notes</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="notes/amp_examples.html">Automatic Mixed Precision examples</a></li>
<li class="toctree-l1"><a class="reference internal" href="notes/autograd.html">Autograd mechanics</a></li>
<li class="toctree-l1"><a class="reference internal" href="notes/broadcasting.html">Broadcasting semantics</a></li>
<li class="toctree-l1"><a class="reference internal" href="notes/cpu_threading_torchscript_inference.html">CPU threading and TorchScript inference</a></li>
<li class="toctree-l1"><a class="reference internal" href="notes/cuda.html">CUDA semantics</a></li>
<li class="toctree-l1"><a class="reference internal" href="notes/ddp.html">Distributed Data Parallel</a></li>
<li class="toctree-l1"><a class="reference internal" href="notes/extending.html">Extending PyTorch</a></li>
<li class="toctree-l1"><a class="reference internal" href="notes/faq.html">Frequently Asked Questions</a></li>
<li class="toctree-l1"><a class="reference internal" href="notes/large_scale_deployments.html">Features for large-scale deployments</a></li>
<li class="toctree-l1"><a class="reference internal" href="notes/multiprocessing.html">Multiprocessing best practices</a></li>
<li class="toctree-l1"><a class="reference internal" href="notes/randomness.html">Reproducibility</a></li>
<li class="toctree-l1"><a class="reference internal" href="notes/serialization.html">Serialization semantics</a></li>
<li class="toctree-l1"><a class="reference internal" href="notes/windows.html">Windows FAQ</a></li>
</ul>
<p class="caption"><span class="caption-text">Language Bindings</span></p>
<ul>
<li class="toctree-l1"><a class="reference external" href="https://pytorch.org/cppdocs/">C++ API</a></li>
<li class="toctree-l1"><a class="reference internal" href="packages.html">Javadoc</a></li>
</ul>
<p class="caption"><span class="caption-text">Python API</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="torch.html">torch</a></li>
<li class="toctree-l1"><a class="reference internal" href="nn.html">torch.nn</a></li>
<li class="toctree-l1"><a class="reference internal" href="nn.functional.html">torch.nn.functional</a></li>
<li class="toctree-l1"><a class="reference internal" href="tensors.html">torch.Tensor</a></li>
<li class="toctree-l1"><a class="reference internal" href="tensor_attributes.html">Tensor Attributes</a></li>
<li class="toctree-l1"><a class="reference internal" href="tensor_view.html">Tensor Views</a></li>
<li class="toctree-l1"><a class="reference internal" href="autograd.html">torch.autograd</a></li>
<li class="toctree-l1"><a class="reference internal" href="cuda.html">torch.cuda</a></li>
<li class="toctree-l1"><a class="reference internal" href="amp.html">torch.cuda.amp</a></li>
<li class="toctree-l1"><a class="reference internal" href="distributed.html">torch.distributed</a></li>
<li class="toctree-l1"><a class="reference internal" href="distributions.html">torch.distributions</a></li>
<li class="toctree-l1"><a class="reference internal" href="hub.html">torch.hub</a></li>
<li class="toctree-l1"><a class="reference internal" href="jit.html">torch.jit</a></li>
<li class="toctree-l1"><a class="reference internal" href="nn.init.html">torch.nn.init</a></li>
<li class="toctree-l1"><a class="reference internal" href="onnx.html">torch.onnx</a></li>
<li class="toctree-l1"><a class="reference internal" href="optim.html">torch.optim</a></li>
<li class="toctree-l1"><a class="reference internal" href="quantization.html">Quantization</a></li>
<li class="toctree-l1"><a class="reference internal" href="rpc/index.html">Distributed RPC Framework</a></li>
<li class="toctree-l1"><a class="reference internal" href="random.html">torch.random</a></li>
<li class="toctree-l1"><a class="reference internal" href="sparse.html">torch.sparse</a></li>
<li class="toctree-l1"><a class="reference internal" href="storage.html">torch.Storage</a></li>
<li class="toctree-l1"><a class="reference internal" href="bottleneck.html">torch.utils.bottleneck</a></li>
<li class="toctree-l1"><a class="reference internal" href="checkpoint.html">torch.utils.checkpoint</a></li>
<li class="toctree-l1"><a class="reference internal" href="cpp_extension.html">torch.utils.cpp_extension</a></li>
<li class="toctree-l1"><a class="reference internal" href="data.html">torch.utils.data</a></li>
<li class="toctree-l1"><a class="reference internal" href="dlpack.html">torch.utils.dlpack</a></li>
<li class="toctree-l1"><a class="reference internal" href="model_zoo.html">torch.utils.model_zoo</a></li>
<li class="toctree-l1"><a class="reference internal" href="tensorboard.html">torch.utils.tensorboard</a></li>
<li class="toctree-l1"><a class="reference internal" href="type_info.html">Type Info</a></li>
<li class="toctree-l1"><a class="reference internal" href="named_tensor.html">Named Tensors</a></li>
<li class="toctree-l1"><a class="reference internal" href="name_inference.html">Named Tensors operator coverage</a></li>
<li class="toctree-l1"><a class="reference internal" href="__config__.html">torch.__config__</a></li>
</ul>
<p class="caption"><span class="caption-text">Libraries</span></p>
<ul>
<li class="toctree-l1"><a class="reference external" href="https://pytorch.org/audio">torchaudio</a></li>
<li class="toctree-l1"><a class="reference external" href="https://pytorch.org/text">torchtext</a></li>
<li class="toctree-l1"><a class="reference external" href="https://pytorch.org/elastic/">TorchElastic</a></li>
<li class="toctree-l1"><a class="reference external" href="https://pytorch.org/serve">TorchServe</a></li>
<li class="toctree-l1"><a class="reference external" href="http://pytorch.org/xla/">PyTorch on XLA Devices</a></li>
</ul>
<p class="caption"><span class="caption-text">Community</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="community/contribution_guide.html">PyTorch Contribution Guide</a></li>
<li class="toctree-l1"><a class="reference internal" href="community/governance.html">PyTorch Governance</a></li>
<li class="toctree-l1"><a class="reference internal" href="community/persons_of_interest.html">PyTorch Governance | Persons of Interest</a></li>
</ul>

            
          

        </div>
      </div>
    </nav>

    <div class="pytorch-container">
      <div class="pytorch-page-level-bar" id="pytorch-page-level-bar">
        <div class="pytorch-breadcrumbs-wrapper">
          















<div role="navigation" aria-label="breadcrumbs navigation">

  <ul class="pytorch-breadcrumbs">
    
      <li>
        <a href="index.html">
          
            Docs
          
        </a> &gt;
      </li>

        
      <li>Python Language Reference Coverage</li>
    
    
      <li class="pytorch-breadcrumbs-aside">
        
            
            <a href="_sources/jit_python_reference.rst.txt" rel="nofollow"><img src="_static/images/view-page-source-icon.svg"></a>
          
        
      </li>
    
  </ul>

  
</div>
        </div>

        <div class="pytorch-shortcuts-wrapper" id="pytorch-shortcuts-wrapper">
          Shortcuts
        </div>
      </div>

      <section data-toggle="wy-nav-shift" id="pytorch-content-wrap" class="pytorch-content-wrap">
        <div class="pytorch-content-left">

        
          
          <div class="rst-content">
          
            <div role="main" class="main-content" itemscope="itemscope" itemtype="http://schema.org/Article">
             <article itemprop="articleBody" id="pytorch-article" class="pytorch-article">
              
  <div class="section" id="python-language-reference-coverage">
<span id="python-language-reference"></span><h1>Python Language Reference Coverage<a class="headerlink" href="#python-language-reference-coverage" title="Permalink to this headline">¶</a></h1>
<p>This is a 1:1 mapping of the features listed in <a class="reference external" href="https://docs.python.org/3/reference/">https://docs.python.org/3/reference/</a> and their
support in TorchScript. The categorizations are as follows:</p>
<table class="docutils align-default">
<colgroup>
<col style="width: 33%" />
<col style="width: 33%" />
<col style="width: 33%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Section</p></th>
<th class="head"><p>Status</p></th>
<th class="head"><p>Note</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/introduction.html">1. Introduction</a></p></td>
<td><p>Not Relevant</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/introduction.html#alternate-implementations">1.1. Alternate Implementations</a></p></td>
<td><p>Not Relevant</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/introduction.html#notation">1.2. Notation</a></p></td>
<td><p>Not Relevant</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/lexical_analysis.html#">2. Lexical analysis</a></p></td>
<td><p>Not Relevant</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/lexical_analysis.html#line-structure">2.1. Line structure</a></p></td>
<td><p>Not Relevant</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/lexical_analysis.html#logical-lines">2.1.1. Logical lines</a></p></td>
<td><p>Not Relevant</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/lexical_analysis.html#physical-lines">2.1.2. Physical lines</a></p></td>
<td><p>Supported</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/lexical_analysis.html#comments">2.1.3. Comments</a></p></td>
<td><p>Supported</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/lexical_analysis.html#encoding-declarations">2.1.4. Encoding declarations</a></p></td>
<td><p>Not Supported</p></td>
<td><p>TorchScript explicitly don’t support unicode</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/lexical_analysis.html#explicit-line-joining">2.1.5. Explicit line joining</a></p></td>
<td><p>Supported</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/lexical_analysis.html#implicit-line-joining">2.1.6. Implicit line joining</a></p></td>
<td><p>Supported</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/lexical_analysis.html#blank-lines">2.1.7. Blank lines</a></p></td>
<td><p>Supported</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/lexical_analysis.html#indentation">2.1.8. Indentation</a></p></td>
<td><p>Supported</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/lexical_analysis.html#whitespace-between-tokens">2.1.9. Whitespace between tokens</a></p></td>
<td><p>Not Relevant</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/lexical_analysis.html#other-tokens">2.2. Other tokens</a></p></td>
<td><p>Not Relevant</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/lexical_analysis.html#identifiers">2.3. Identifiers and keywords</a></p></td>
<td><p>Supported</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/lexical_analysis.html#keywords">2.3.1. Keywords</a></p></td>
<td><p>Supported</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/lexical_analysis.html#reserved-classes-of-identifiers">2.3.2. Reserved classes of identifiers</a></p></td>
<td><p>Supported</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/lexical_analysis.html#literals">2.4. Literals</a></p></td>
<td><p>Not Relevant</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/lexical_analysis.html#string-and-bytes-literals">2.4.1. String and Bytes literals</a></p></td>
<td><p>Supported</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/lexical_analysis.html#string-literal-concatenation">2.4.2. String literal concatenation</a></p></td>
<td><p>Supported</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/lexical_analysis.html#formatted-string-literals">2.4.3. Formatted string literals</a></p></td>
<td><p>Partially Supported</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/lexical_analysis.html#numeric-literals">2.4.4. Numeric literals</a></p></td>
<td><p>Supported</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/lexical_analysis.html#integer-literals">2.4.5. Integer literals</a></p></td>
<td><p>Supported</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/lexical_analysis.html#floating-point-literals">2.4.6. Floating point literals</a></p></td>
<td><p>Supported</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/lexical_analysis.html#imaginary-literals">2.4.7. Imaginary literals</a></p></td>
<td><p>Not Supported</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/lexical_analysis.html#operators">2.5. Operators</a></p></td>
<td><p>Partially Supported</p></td>
<td><p>Not supported: <code class="docutils literal notranslate"><span class="pre">&lt;&lt;</span></code>, <code class="docutils literal notranslate"><span class="pre">&gt;&gt;</span></code>, <code class="docutils literal notranslate"><span class="pre">:=</span></code></p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/lexical_analysis.html#delimiters">2.6. Delimiters</a></p></td>
<td><p>Partially Supported</p></td>
<td><p>Not supported: <code class="docutils literal notranslate"><span class="pre">**=</span></code>, <code class="docutils literal notranslate"><span class="pre">&lt;&lt;=</span></code>, <code class="docutils literal notranslate"><span class="pre">&gt;&gt;=</span></code>, <code class="docutils literal notranslate"><span class="pre">%=</span></code>, <code class="docutils literal notranslate"><span class="pre">^=</span></code>, <code class="docutils literal notranslate"><span class="pre">&#64;=</span></code>, <code class="docutils literal notranslate"><span class="pre">&amp;=</span></code>, <code class="docutils literal notranslate"><span class="pre">//=</span></code>, <code class="docutils literal notranslate"><span class="pre">%</span></code> operator for some types (e.g. <code class="docutils literal notranslate"><span class="pre">str</span></code>)</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/datamodel.html#">3. Data model</a></p></td>
<td><p>Not Relevant</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/datamodel.html#objects-values-and-types">3.1. Objects, values and types</a></p></td>
<td><p>Not Relevant</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/datamodel.html#the-standard-type-hierarchy">3.2. The standard type hierarchy</a></p></td>
<td><p>Partially Supported</p></td>
<td><p>Not supported: NotImplemented, Ellipsis, numbers.Complex, bytes, byte arrays, sets, frozen sets, generators, coroutines, async generators, modules, I/O objects, internal objects, slice objects ( though slicing is supported), classmethod</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/datamodel.html#special-method-names">3.3. Special method names</a></p></td>
<td><p>Supported</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/datamodel.html#basic-customization">3.3.1. Basic customization</a></p></td>
<td><p>Partially Supported</p></td>
<td><p>Not supported: <code class="docutils literal notranslate"><span class="pre">__new__</span></code> , <code class="docutils literal notranslate"><span class="pre">__del__</span></code> , <code class="docutils literal notranslate"><span class="pre">__bytes__</span></code> , <code class="docutils literal notranslate"><span class="pre">__format__</span></code> , <code class="docutils literal notranslate"><span class="pre">__hash__</span></code> ,</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/datamodel.html#customizing-attribute-access">3.3.2. Customizing attribute access</a></p></td>
<td><p>Not Supported</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/datamodel.html#customizing-module-attribute-access">3.3.2.1. Customizing module attribute access</a></p></td>
<td><p>Not Supported</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/datamodel.html#implementing-descriptors">3.3.2.2. Implementing Descriptors</a></p></td>
<td><p>Not Supported</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/datamodel.html#invoking-descriptors">3.3.2.3. Invoking Descriptors</a></p></td>
<td><p>Not Supported</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/datamodel.html#slots">3.3.2.4. __slots__</a></p></td>
<td><p>Not Supported</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/datamodel.html#notes-on-using-slots">3.3.2.4.1. Notes on using __slots__</a></p></td>
<td><p>Not Supported</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/datamodel.html#customizing-class-creation">3.3.3. Customizing class creation</a></p></td>
<td><p>Not Supported</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/datamodel.html#metaclasses">3.3.3.1. Metaclasses</a></p></td>
<td><p>Not Supported</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/datamodel.html#resolving-mro-entries">3.3.3.2. Resolving MRO entries</a></p></td>
<td><p>Not Supported</p></td>
<td><p><code class="docutils literal notranslate"><span class="pre">super()</span></code> is not supported</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/datamodel.html#determining-the-appropriate-metaclass">3.3.3.3. Determining the appropriate metaclass</a></p></td>
<td><p>Not relevant</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/datamodel.html#preparing-the-class-namespace">3.3.3.4. Preparing the class namespace</a></p></td>
<td><p>Not relevant</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/datamodel.html#executing-the-class-body">3.3.3.5. Executing the class body</a></p></td>
<td><p>Not relevant</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/datamodel.html#creating-the-class-object">3.3.3.6. Creating the class object</a></p></td>
<td><p>Not relevant</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/datamodel.html#uses-for-metaclasses">3.3.3.7. Uses for metaclasses</a></p></td>
<td><p>Not relevant</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/datamodel.html#customizing-instance-and-subclass-checks">3.3.4. Customizing instance and subclass checks</a></p></td>
<td><p>Not Supported</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/datamodel.html#emulating-generic-types">3.3.5. Emulating generic types</a></p></td>
<td><p>Not Supported</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/datamodel.html#emulating-callable-objects">3.3.6. Emulating callable objects</a></p></td>
<td><p>Supported</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/datamodel.html#emulating-container-types">3.3.7. Emulating container types</a></p></td>
<td><p>Partially Supported</p></td>
<td><p>Some magic methods not supported (e.g. <code class="docutils literal notranslate"><span class="pre">__iter__</span></code> )</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/datamodel.html#emulating-numeric-types">3.3.8. Emulating numeric types</a></p></td>
<td><p>Partially Supported</p></td>
<td><p>Magic methods with swapped operands not supported (<code class="docutils literal notranslate"><span class="pre">__r*__</span></code>)</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/datamodel.html#with-statement-context-managers">3.3.9. With Statement Context Managers</a></p></td>
<td><p>Not Supported</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/datamodel.html#special-method-lookup">3.3.10. Special method lookup</a></p></td>
<td><p>Not relevant</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/datamodel.html#coroutines">3.4. Coroutines</a></p></td>
<td><p>Not Supported</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/datamodel.html#awaitable-objects">3.4.1. Awaitable Objects</a></p></td>
<td><p>Not Supported</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/datamodel.html#coroutine-objects">3.4.2. Coroutine Objects</a></p></td>
<td><p>Not Supported</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/datamodel.html#asynchronous-iterators">3.4.3. Asynchronous Iterators</a></p></td>
<td><p>Not Supported</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/datamodel.html#asynchronous-context-managers">3.4.4. Asynchronous Context Managers</a></p></td>
<td><p>Not Supported</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/executionmodel.html#">4. Execution model</a></p></td>
<td><p>Not Relevant</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/executionmodel.html#structure-of-a-program">4.1. Structure of a program</a></p></td>
<td><p>Not Relevant</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/executionmodel.html#naming-and-binding">4.2. Naming and binding</a></p></td>
<td><p>Not Relevant</p></td>
<td><p>Names are bound at compile time in TorchScript</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/executionmodel.html#binding-of-names">4.2.1. Binding of names</a></p></td>
<td><p>Not Relevant</p></td>
<td><p>See <code class="docutils literal notranslate"><span class="pre">global</span></code> and <code class="docutils literal notranslate"><span class="pre">nonlocal</span></code> statements section</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/executionmodel.html#resolution-of-names">4.2.2. Resolution of names</a></p></td>
<td><p>Not Relevant</p></td>
<td><p>See <code class="docutils literal notranslate"><span class="pre">global</span></code> and <code class="docutils literal notranslate"><span class="pre">nonlocal</span></code> statements section</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/executionmodel.html#builtins-and-restricted-execution">4.2.3. Builtins and restricted execution</a></p></td>
<td><p>Not Relevant</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/executionmodel.html#interaction-with-dynamic-features">4.2.4. Interaction with dynamic features</a></p></td>
<td><p>Not Supported</p></td>
<td><p>Python values cannot be captured</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/executionmodel.html#exceptions">4.3. Exceptions</a></p></td>
<td><p>Partially Supported</p></td>
<td><p>See <code class="docutils literal notranslate"><span class="pre">try</span></code> and <code class="docutils literal notranslate"><span class="pre">raise</span></code> statement section</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/import.html">5. The import system</a></p></td>
<td><p>Not Relevant</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/expressions.html#">6. Expressions</a></p></td>
<td><p>Not Relevant</p></td>
<td><p>See expressions section</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/expressions.html#arithmetic-conversions">6.1. Arithmetic conversions</a></p></td>
<td><p>Supported</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/expressions.html#atoms">6.2. Atoms</a></p></td>
<td><p>Not Relevant</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/expressions.html#atom-identifiers">6.2.1. Identifiers (Names)</a></p></td>
<td><p>Supported</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/expressions.html#literals">6.2.2. Literals</a></p></td>
<td><p>Partially Supported</p></td>
<td><p><code class="docutils literal notranslate"><span class="pre">bytesliteral</span></code>, <code class="docutils literal notranslate"><span class="pre">imagnumber</span></code> not supported</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/expressions.html#parenthesized-forms">6.2.3. Parenthesized forms</a></p></td>
<td><p>Supported</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/expressions.html#displays-for-lists-sets-and-dictionaries">6.2.4. Displays for lists, sets and dictionaries</a></p></td>
<td><p>Partially Supported</p></td>
<td><p>Not supported: comprehension ifs, async iterators</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/expressions.html#list-displays">6.2.5. List displays</a></p></td>
<td><p>Supported</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/expressions.html#set-displays">6.2.6. Set displays</a></p></td>
<td><p>Not Supported</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/expressions.html#dictionary-displays">6.2.7. Dictionary displays</a></p></td>
<td><p>Supported</p></td>
<td><p>dict() constructor with kwargs doesn’t work, dict comprehensions, dictionary unpacking</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/expressions.html#generator-expressions">6.2.8. Generator expressions</a></p></td>
<td><p>Not Supported</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/expressions.html#yield-expressions">6.2.9. Yield expressions</a></p></td>
<td><p>Not Supported</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/expressions.html#generator-iterator-methods">6.2.9.1. Generator-iterator methods</a></p></td>
<td><p>Not Supported</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/expressions.html#examples">6.2.9.2. Examples</a></p></td>
<td><p>Not Supported</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/expressions.html#asynchronous-generator-functions">6.2.9.3. Asynchronous generator functions</a></p></td>
<td><p>Not Supported</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/expressions.html#asynchronous-generator-iterator-methods">6.2.9.4. Asynchronous generator-iterator methods</a></p></td>
<td><p>Not Supported</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/expressions.html#primaries">6.3. Primaries</a></p></td>
<td><p>Supported</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/expressions.html#attribute-references">6.3.1. Attribute references</a></p></td>
<td><p>Supported</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/expressions.html#subscriptions">6.3.2. Subscriptions</a></p></td>
<td><p>Supported</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/expressions.html#slicings">6.3.3. Slicings</a></p></td>
<td><p>Partially Supported</p></td>
<td><p>Tuple slicing with stride is not supported</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/expressions.html#calls">6.3.4. Calls</a></p></td>
<td><p>Partially Supported</p></td>
<td><p>Args unpack / kwargs unpack is not supported</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/expressions.html#await-expression">6.4. Await expression</a></p></td>
<td><p>Not Supported</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/expressions.html#the-power-operator">6.5. The power operator</a></p></td>
<td><p>Supported</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/expressions.html#unary-arithmetic-and-bitwise-operations">6.6. Unary arithmetic and bitwise operations</a></p></td>
<td><p>Partially Supported</p></td>
<td><p>Some bitwise operators are not implemented for primitive types (e.g. <code class="docutils literal notranslate"><span class="pre">~x</span></code> where <code class="docutils literal notranslate"><span class="pre">x</span></code> is an <code class="docutils literal notranslate"><span class="pre">int</span></code> is not currently supported)</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/expressions.html#binary-arithmetic-operations">6.7. Binary arithmetic operations</a></p></td>
<td><p>Partially Supported</p></td>
<td><p>See delimiters section</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/expressions.html#shifting-operations">6.8. Shifting operations</a></p></td>
<td><p>Not Supported</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/expressions.html#binary-bitwise-operations">6.9. Binary bitwise operations</a></p></td>
<td><p>Supported</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/expressions.html#comparisons">6.10. Comparisons</a></p></td>
<td><p>Supported</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/expressions.html#value-comparisons">6.10.1. Value comparisons</a></p></td>
<td><p>Partially Supported</p></td>
<td><p>Dictionary equality checks are not currently supported</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/expressions.html#membership-test-operations">6.10.2. Membership test operations</a></p></td>
<td><p>Partially Supported</p></td>
<td><p>Not supported for TorchScript classes</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/expressions.html#is-not">6.10.3. Identity comparisons</a></p></td>
<td><p>Supported</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/expressions.html#boolean-operations">6.11. Boolean operations</a></p></td>
<td><p>Supported</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/expressions.html#conditional-expressions">6.12. Conditional expressions</a></p></td>
<td><p>Supported</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/expressions.html#lambda">6.13. Lambdas</a></p></td>
<td><p>Not Supported</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/expressions.html#expression-lists">6.14. Expression lists</a></p></td>
<td><p>Partially Supported</p></td>
<td><p>Iterable unpacking not supported</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/expressions.html#evaluation-order">6.15. Evaluation order</a></p></td>
<td><p>Supported</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/expressions.html#operator-precedence">6.16. Operator precedence</a></p></td>
<td><p>Supported</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/simple_stmts.html#">7. Simple statements</a></p></td>
<td><p>Supported</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/simple_stmts.html#expression-statements">7.1. Expression statements</a></p></td>
<td><p>Supported</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/simple_stmts.html#assignment-statements">7.2. Assignment statements</a></p></td>
<td><p>Supported</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/simple_stmts.html#augmented-assignment-statements">7.2.1. Augmented assignment statements</a></p></td>
<td><p>Partially Supported</p></td>
<td><p>See delimiters section</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/simple_stmts.html#annotated-assignment-statements">7.2.2. Annotated assignment statements</a></p></td>
<td><p>Supported</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/simple_stmts.html#the-assert-statement">7.3. The assert statement</a></p></td>
<td><p>Partially Supported</p></td>
<td><p>Exception message is not customizable</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/simple_stmts.html#the-pass-statement">7.4. The pass statement</a></p></td>
<td><p>Supported</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/simple_stmts.html#the-del-statement">7.5. The del statement</a></p></td>
<td><p>Not Supported</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/simple_stmts.html#the-return-statement">7.6. The return statement</a></p></td>
<td><p>Supported</p></td>
<td><p>Some other features of returning (e.g. behavior with try..finally) are unsupported</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/simple_stmts.html#the-yield-statement">7.7. The yield statement</a></p></td>
<td><p>Not Supported</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/simple_stmts.html#the-raise-statement">7.8. The raise statement</a></p></td>
<td><p>Partially Supported</p></td>
<td><p>Exception message is not customizable</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/simple_stmts.html#the-break-statement">7.9. The break statement</a></p></td>
<td><p>Supported</p></td>
<td><p>Some other features of returning (e.g. behavior with try..finally) are unsupported</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/simple_stmts.html#the-continue-statement">7.10. The continue statement</a></p></td>
<td><p>Supported</p></td>
<td><p>Some other features of returning (e.g. behavior with try..finally) are unsupported</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/simple_stmts.html#the-import-statement">7.11. The import statement</a></p></td>
<td><p>Not Supported</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/simple_stmts.html#future-statements">7.11.1. Future statements</a></p></td>
<td><p>Not Supported</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/simple_stmts.html#the-global-statement">7.12. The global statement</a></p></td>
<td><p>Not Supported</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/simple_stmts.html#the-nonlocal-statement">7.13. The nonlocal statement</a></p></td>
<td><p>Not Supported</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/compound_stmts.html#">8. Compound statements</a></p></td>
<td><p>Irrelevant</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/compound_stmts.html#the-if-statement">8.1. The if statement</a></p></td>
<td><p>Supported</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/compound_stmts.html#the-while-statement">8.2. The while statement</a></p></td>
<td><p>Partially Supported</p></td>
<td><p>while..else is not supported</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/compound_stmts.html#the-for-statement">8.3. The for statement</a></p></td>
<td><p>Partially Supported</p></td>
<td><p>for..else is not supported</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/compound_stmts.html#the-try-statement">8.4. The try statement</a></p></td>
<td><p>Not Supported</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/compound_stmts.html#the-with-statement">8.5. The with statement</a></p></td>
<td><p>Not Supported</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/compound_stmts.html#function-definitions">8.6. Function definitions</a></p></td>
<td><p>Not Supported</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/compound_stmts.html#class-definitions">8.7. Class definitions</a></p></td>
<td><p>Not Supported</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/compound_stmts.html#coroutines">8.8. Coroutines</a></p></td>
<td><p>Not Supported</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/compound_stmts.html#coroutine-function-definition">8.8.1. Coroutine function definition</a></p></td>
<td><p>Not Supported</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/compound_stmts.html#the-async-for-statement">8.8.2. The async for statement</a></p></td>
<td><p>Not Supported</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/compound_stmts.html#the-async-with-statement">8.8.3. The async with statement</a></p></td>
<td><p>Not Supported</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/toplevel_components.html#">9. Top-level components</a></p></td>
<td><p>Not Relevant</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/toplevel_components.html#complete-python-programs">9.1. Complete Python programs</a></p></td>
<td><p>Not Relevant</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/toplevel_components.html#file-input">9.2. File input</a></p></td>
<td><p>Not Relevant</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://docs.python.org/3/reference/toplevel_components.html#interactive-input">9.3. Interactive input</a></p></td>
<td><p>Not Relevant</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://docs.python.org/3/reference/toplevel_components.html#expression-input">9.4. Expression input</a></p></td>
<td><p>Not Relevant</p></td>
<td></td>
</tr>
</tbody>
</table>
</div>


             </article>
             
            </div>
            <footer>
  

  

    <hr>

  

  <div role="contentinfo">
    <p>
        &copy; Copyright 2019, Torch Contributors.

    </p>
  </div>
    
      <div>
        Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
      </div>
     

</footer>

          </div>
        </div>

        <div class="pytorch-content-right" id="pytorch-content-right">
          <div class="pytorch-right-menu" id="pytorch-right-menu">
            <div class="pytorch-side-scroll" id="pytorch-side-scroll-right">
              <ul>
<li><a class="reference internal" href="#">Python Language Reference Coverage</a></li>
</ul>

            </div>
          </div>
        </div>
      </section>
    </div>

  


  

     
       <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
         <script src="_static/jquery.js"></script>
         <script src="_static/underscore.js"></script>
         <script src="_static/doctools.js"></script>
         <script src="_static/language_data.js"></script>
     

  

  <script type="text/javascript" src="_static/js/vendor/popper.min.js"></script>
  <script type="text/javascript" src="_static/js/vendor/bootstrap.min.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/list.js/1.5.0/list.min.js"></script>
  <script type="text/javascript" src="_static/js/theme.js"></script>

  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script>
 
<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-90545585-1', 'auto');
  ga('send', 'pageview');

</script>

<script async src="https://www.googletagmanager.com/gtag/js?id=UA-117752657-2"></script>

<script>
  window.dataLayer = window.dataLayer || [];

  function gtag(){dataLayer.push(arguments);}

  gtag('js', new Date());
  gtag('config', 'UA-117752657-2');
</script>

<img height="1" width="1" style="border-style:none;" alt="" src="https://www.googleadservices.com/pagead/conversion/795629140/?label=txkmCPmdtosBENSssfsC&amp;guid=ON&amp;script=0"/>


  <!-- Begin Footer -->

  <div class="container-fluid docs-tutorials-resources" id="docs-tutorials-resources">
    <div class="container">
      <div class="row">
        <div class="col-md-4 text-center">
          <h2>Docs</h2>
          <p>Access comprehensive developer documentation for PyTorch</p>
          <a class="with-right-arrow" href="https://pytorch.org/docs/stable/index.html">View Docs</a>
        </div>

        <div class="col-md-4 text-center">
          <h2>Tutorials</h2>
          <p>Get in-depth tutorials for beginners and advanced developers</p>
          <a class="with-right-arrow" href="https://pytorch.org/tutorials">View Tutorials</a>
        </div>

        <div class="col-md-4 text-center">
          <h2>Resources</h2>
          <p>Find development resources and get your questions answered</p>
          <a class="with-right-arrow" href="https://pytorch.org/resources">View Resources</a>
        </div>
      </div>
    </div>
  </div>

  <footer class="site-footer">
    <div class="container footer-container">
      <div class="footer-logo-wrapper">
        <a href="https://pytorch.org/" class="footer-logo"></a>
      </div>

      <div class="footer-links-wrapper">
        <div class="footer-links-col">
          <ul>
            <li class="list-title"><a href="https://pytorch.org/">PyTorch</a></li>
            <li><a href="https://pytorch.org/get-started">Get Started</a></li>
            <li><a href="https://pytorch.org/features">Features</a></li>
            <li><a href="https://pytorch.org/ecosystem">Ecosystem</a></li>
            <li><a href="https://pytorch.org/blog/">Blog</a></li>
            <li><a href="https://github.com/pytorch/pytorch/blob/master/CONTRIBUTING.md">Contributing</a></li>
          </ul>
        </div>

        <div class="footer-links-col">
          <ul>
            <li class="list-title"><a href="https://pytorch.org/resources">Resources</a></li>
            <li><a href="https://pytorch.org/tutorials">Tutorials</a></li>
            <li><a href="https://pytorch.org/docs/stable/index.html">Docs</a></li>
            <li><a href="https://discuss.pytorch.org" target="_blank">Discuss</a></li>
            <li><a href="https://github.com/pytorch/pytorch/issues" target="_blank">Github Issues</a></li>
            <li><a href="https://pytorch.org/assets/brand-guidelines/PyTorch-Brand-Guidelines.pdf" target="_blank">Brand Guidelines</a></li>
          </ul>
        </div>

        <div class="footer-links-col follow-us-col">
          <ul>
            <li class="list-title">Stay Connected</li>
            <li>
              <div id="mc_embed_signup">
                <form
                  action="https://twitter.us14.list-manage.com/subscribe/post?u=75419c71fe0a935e53dfa4a3f&id=91d0dccd39"
                  method="post"
                  id="mc-embedded-subscribe-form"
                  name="mc-embedded-subscribe-form"
                  class="email-subscribe-form validate"
                  target="_blank"
                  novalidate>
                  <div id="mc_embed_signup_scroll" class="email-subscribe-form-fields-wrapper">
                    <div class="mc-field-group">
                      <label for="mce-EMAIL" style="display:none;">Email Address</label>
                      <input type="email" value="" name="EMAIL" class="required email" id="mce-EMAIL" placeholder="Email Address">
                    </div>

                    <div id="mce-responses" class="clear">
                      <div class="response" id="mce-error-response" style="display:none"></div>
                      <div class="response" id="mce-success-response" style="display:none"></div>
                    </div>    <!-- real people should not fill this in and expect good things - do not remove this or risk form bot signups-->

                    <div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_75419c71fe0a935e53dfa4a3f_91d0dccd39" tabindex="-1" value=""></div>

                    <div class="clear">
                      <input type="submit" value="" name="subscribe" id="mc-embedded-subscribe" class="button email-subscribe-button">
                    </div>
                  </div>
                </form>
              </div>

            </li>
          </ul>

          <div class="footer-social-icons">
            <a href="https://www.facebook.com/pytorch" target="_blank" class="facebook"></a>
            <a href="https://twitter.com/pytorch" target="_blank" class="twitter"></a>
            <a href="https://www.youtube.com/pytorch" target="_blank" class="youtube"></a>
          </div>
        </div>
      </div>
    </div>
  </footer>

  <div class="cookie-banner-wrapper">
  <div class="container">
    <p class="gdpr-notice">To analyze traffic and optimize your experience, we serve cookies on this site. By clicking or navigating, you agree to allow our usage of cookies. As the current maintainers of this site, Facebook’s Cookies Policy applies. Learn more, including about available controls: <a href="https://www.facebook.com/policies/cookies/">Cookies Policy</a>.</p>
    <img class="close-button" src="_static/images/pytorch-x.svg">
  </div>
</div>

  <!-- End Footer -->

  <!-- Begin Mobile Menu -->

  <div class="mobile-main-menu">
    <div class="container-fluid">
      <div class="container">
        <div class="mobile-main-menu-header-container">
          <a class="header-logo" href="https://pytorch.org/" aria-label="PyTorch"></a>
          <a class="main-menu-close-button" href="#" data-behavior="close-mobile-menu"></a>
        </div>
      </div>
    </div>

    <div class="mobile-main-menu-links-container">
      <div class="main-menu">
        <ul>
          <li>
            <a href="https://pytorch.org/get-started">Get Started</a>
          </li>

          <li>
            <a href="https://pytorch.org/features">Features</a>
          </li>

          <li>
            <a href="https://pytorch.org/ecosystem">Ecosystem</a>
          </li>

          <li>
            <a href="https://pytorch.org/mobile">Mobile</a>
          </li>

          <li>
            <a href="https://pytorch.org/hub">PyTorch Hub</a>
          </li>

          <li>
            <a href="https://pytorch.org/blog/">Blog</a>
          </li>

          <li>
            <a href="https://pytorch.org/tutorials">Tutorials</a>
          </li>

          <li class="active">
            <a href="https://pytorch.org/docs/stable/index.html">Docs</a>
          </li>

          <li>
            <a href="https://pytorch.org/resources">Resources</a>
          </li>

          <li>
            <a href="https://github.com/pytorch/pytorch">Github</a>
          </li>
        </ul>
      </div>
    </div>
  </div>

  <!-- End Mobile Menu -->

  <script type="text/javascript" src="_static/js/vendor/anchor.min.js"></script>

  <script type="text/javascript">
    $(document).ready(function() {
      mobileMenu.bind();
      mobileTOC.bind();
      pytorchAnchors.bind();
      sideMenus.bind();
      scrollToAnchor.bind();
      highlightNavigation.bind();
      mainMenuDropdown.bind();
      filterTags.bind();

      // Remove any empty p tags that Sphinx adds
      $("[data-tags='null']").remove();

      // Add class to links that have code blocks, since we cannot create links in code blocks
      $("article.pytorch-article a span.pre").each(function(e) {
        $(this).closest("a").addClass("has-code");
      });
    })
  </script>
</body>
</html>